<?php
?>
<!DOCTYPE html>
<html lang="es">
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>Android Camera Demo</title>

  <!-- droidiface lib -->
  <script type="text/javascript" src="droidiface.js"></script>

  <!-- user code -->
  <script type="text/javascript">
     function requestPicture() 
     {
          GN.Camera.requestAndroidPicture( function(img) {
                 document.getElementById('ima').src = "data:image/png;base64,"+img;
          });
     }    

     function requestGPSCoordinates() 
     {
       var latlng = GN.GPS.getLatLng();
       if( "" == latlng ) {  
           document.getElementById('latlng').innerHTML = 'NO GPS DATA';
           return false; 
       }
       document.getElementById('latlng').innerHTML = latlng;
     }
  </script>
 </head>
 <body>
  <center>
   <h2> Retail Brain - Droid support</h2><br>
   <a id='ctrl' href='#' onclick='return requestPicture();'>Camera</a>
   &nbsp; &nbsp; <a id='ctrl' href='#' onclick='return requestGPSCoordinates();'>GPS</a>
   <hr>
   <img id='ima' alt="Picture Frame">
   <div id="latlng">
   </div>
 </center>
 </body>
</html>
